<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"/>

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css"/>

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>

<title>Registration</title>
</head>
<body>
<div class="container">
	<h1>User registration</h1>
	<form:form method="POST" commandName="user"
		action="${pageContext.request.contextPath}/user/create">
		<table>
			<tbody>
				<tr>
					<td>User name:</td>
					<td><form:input path="username" /></td>
					<td><form:errors path="username" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					<td>Password:</td>
					<td><form:password path="password" /></td>
					<td><form:errors path="password" cssStyle="color: red;" /></td>
				</tr>
				<!--
				<tr>
					<td>Confirmed password:</td>
					 
					<td><form:input path="password" /></td>
					<td><form:errors path="password" cssStyle="color: red;" /></td>
					 
					
				</tr>
				-->
				<tr>
					<td>Full name:</td>
					<td><form:input path="fullName" /></td>
					<td><form:errors path="fullName" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					<td>Email:</td>
					<td><form:input path="email" /></td>
					<td><form:errors path="email" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					<td>Address:</td>
					<td><form:input path="address" /></td>
					<td><form:errors path="address" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					<td>Telephone:</td>
					<td><form:input path="telephone" /></td>
					<td><form:errors path="telephone" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					<td>Role:</td>
					<td><form:select path="role">
							<form:option value="USER"></form:option>
							<form:option value="ADMIN"></form:option>
						</form:select>
					</td>
					<td><form:errors path="role" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					<td><input type="submit" value="Register"  class="btn btn-default" /></td>
					<td></td>
					<td></td>
				</tr>
			</tbody>
		</table>
	</form:form>
	<a href="${pageContext.request.contextPath}/">Home page</a>
</div>
</body>
</html>